/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.common.h;

import android.content.Context;
import android.text.TextUtils;
import com.qihoo.gamecenter.sdk.common.i.c;
import com.qihoo.gamecenter.sdk.common.i.s;
import org.json.JSONException;
import org.json.JSONObject;

@Deprecated
public class b extends g {
    private String a;

    public void a(String paramString, Context paramContext) {
        a();
        a(paramString);
        a(c(), paramContext);
    }

    public void a() {}

    protected void a(String paramString) {
        this.a = paramString;
        c.a("BaseTaskTermination", new Object[] { "setNetworkResult = ", this.a });
    }

    protected JSONObject b() {
        JSONObject localJSONObject = c();
        return ((localJSONObject != null) ? localJSONObject.optJSONObject("content") : null);
    }

    protected void a(JSONObject paramJSONObject, Context paramContext) {
        if ((paramJSONObject == null) || (paramContext == null))
            return;
        int i = paramJSONObject.optInt("error_code", 0);
        if (i == 0)
            return;
        String str = paramJSONObject.optString("error_msg");
        if (TextUtils.isEmpty(str))
            return;
        a(paramContext, i, str, false);
    }

    protected void a(Context paramContext, int paramInt, String paramString, boolean paramBoolean) {
        s.a(paramContext, paramInt, paramString, paramBoolean);
    }

    private JSONObject c() {
        if (!(TextUtils.isEmpty(this.a)))
            try {
                return new JSONObject(this.a);
            } catch (JSONException localJSONException) {
                c.b("BaseTaskTermination", new Object[] { localJSONException.toString() });
            }
        return null;
    }
}